package com.sangmo.fts.process.factoring.service;

import com.sangmo.boot.framework.plugin.dataview.crud.service.BaseViewService;
import com.sangmo.boot.framework.plugin.dataview.data.IDataViewRepo;
import com.sangmo.fts.process.factoring.model.FfWaybillItem;
import com.sangmo.fts.process.factoring.repo.FfWaybillItemRepo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
@Transactional
public class FfWaybillItemEntityService extends BaseViewService<FfWaybillItem> {

    @Autowired
    private FfWaybillItemRepo ffWaybillItemRepo;

    @Override
    protected IDataViewRepo<FfWaybillItem> getRepo() {
        return ffWaybillItemRepo;
    }

    public List<FfWaybillItem> saveAll(List<FfWaybillItem> waybillItems) {
        return ffWaybillItemRepo.saveAll(waybillItems);
    }
}
